1. Field of the Invention
The present invention relates to data access control systems for reading and writing data from/to mass storage devices such as magnetic disks, as well as to computer-readable media encoded with a data access control program. The present invention relates more particularly to a data access control system which reads and writes data while meeting the requirements of realtime applications, and to a computer-readable medium encoded with a data access control program designed to provide such functionalities.
2. Description of the Related Art
The primary function of video servers, computer equipment designed for video-on-demand services, is to read out a large amount of data from magnetic disk storage and deliver it to a plurality of client terminals, while ensuring realtime reconstruction of visual information at the receiving ends. To realize this function, video servers are required to have a special mechanism to read data from disk storage at a high speed.
Consider, for example, an MPEG-2 (the second-phase standard of Motion Picture Experts Group) video stream with a bitrate of 6.144 Mb/s (megabit per second). To concurrently output fourteen such streams, the video server must provide the total data transfer rate of about 86 Mb/s, or about 10.8 MB/s (megabyte per second). However, even with the latest storage technologies, a single disk drive can only provide an average sustained data transfer rate of 4 MB/s to 5 MB/s. Furthermore, each video data cannot be stored in a disk as a single continuous data stream, but has to be stored as a collection of small blocks, so that the blocks of different streams will be sequentially read out at equal bitrates. This data segmentation, however, causes frequent seek and wait operations in the sequential disk access, which can be another significant factor to lower the system's average throughput.
Taking the above problems into consideration, most video servers employ not a single disk drive, but a plurality of disk drives, or a disk array. All the video streams, being divided into a plurality of data blocks, are distributed across different disks in a prescribed sequence, with a technique known as "striping." Here, all the disk drives are connected on a single data bus. The data blocks read out of the disks is once transferred from a disk interface circuit to a buffer memory for temporary storage and then delivered to the clients through a network interface, while the data flow of each individual video stream is regulated so as to keep a constant data transfer rate required.
FIG. 12 shows how the data is read out from five disk drives and transferred through the data bus. Here, data access and transfer operations occurring in the individual disks are illustrated in the form of horizontal bars, where each shaded portion represents a period "a" that is spent for reading data from a disk. Every disk access involves seek, wait, and data read operations. "Seek" operation is to position the read/write heads on the desired track, and "wait" operation is to remain idle until the platter rotates and the desired sector comes under the heads. "Data read" operation is to read data recorded on the platter and transfer it to the drive's local cache memory. The period "a" in FIG. 12 represents the total time of these three operations, and the present description will use the term "data read operation" to refer to the three operations collectively, unless otherwise noted. Also in FIG. 12, the crosshatched part of each bar represents a data bus transfer time "b" which is required to transfer data from the local cache memory to the data bus.
Since the video server is designed to read video data through a common data bus, it is not allowed for the disk drives to place their outputs simultaneously on the same bus. To efficiently use the limited data bus bandwidth, the disk access is totally scheduled so that the drives will output data with different timing offsets. In this scheduled disk access, one drive sends its read data to the data bus while other drives are performing their respective data read operations (i.e., seeking tracks, waiting platter spins, and reading data). In this way, the above-described disk array system promises better performance than a single drive system, with respect to the average sustained data transfer rates.
Consider, for example, that a plurality of disk drives each providing average sustained data transfer rate of 4 MB/s, maximum seek time of 17 ms, and maximum disk latency of 8.3 ms are used to store an MPEG-2 compressed video stream with a bitrate of 6.144 Mb/s. The data is striped over such drives in such a way that each block contains a piece of video information for half a second, which is equal to 384 KB (6.144 Mb/s.times.0.5 s=3.072 megabits=384 kilobytes). To interface with the disk drives, the system employs a Wide-Fast SCSI bus, which is the 16-bit expanded version of the Small Computer System Interface (SCSI) bus enhanced for high-speed data transfer. Since this standard bus provides a data transfer rate of 20 MB/s, the periods a and b shown in FIG. 12 are calculated as ##EQU1## where the term "overhead" is the time required for the data bus to convey the control messages, including commands sent from disk interface to disk drives and responses returned from disk drives to disk interface. In the present example, each disk drive provides an average sustained throughput of EQU 384 KB/(140 ms+35 ms).congruent.2.2 MB/s (3)
Accordingly, the five disk drives will exhibit an overall data transfer rate of 11.0 MB/s (i.e., 2.2 MB/s.times.5). This yields the maximum number of streams as EQU 11.0.times.8/6.144=14.3, (4)
which means that the video server can deliver up to fourteen concurrent video streams, each with a bitrate of 6.144 Mb/s.
In real life, however, bit errors inevitably happen during the disk read cycles. Therefore, most disk storage systems are designed to execute read retry operations, when they encountered a read error during the disk access, until the correct data is obtained. If the data has been successfully read out, the system completes the cycle as a normal end. On the other hand, if a predetermined number of read retry operations have ended up in vain, the system terminates the read cycle, taking it as a true read error. Since, each typical read retry operation needs one extra spin of disk media, or platters, it takes 8.3 ms for the system to retry a read access to the aforementioned disk drives, which equals the maximum latency of the disks.
In order to meet the realtime requirements in the heaviest load conditions (e.g., when supplying a maximum number of streams), conventional video servers have introduced the concept of time slots into their basic design. More specifically, a time slot is defined to be a fixed period of (a+b) shown in FIG. 12, and every disk access is scheduled on the basis of the time slots. The disk drives are controlled to finish both data read and bus transfer operations for every data block within the limited period of a time slot.
Such a disk array will exhibit its maximum performance as a whole when all individual disk drives produce their maximum throughput as shown in the timing diagram of FIG. 12. This design, however, spares no time for making a read retry operation to recover from read errors. A read error, if happened in a data read operation, directly cause an abnormal end of that session, resulting in the complete lack of that data block. This leads, for example, to a blackout for half a second at the clients' monitor screens.
One obvious method to avoid this problem is to introduce some timing margin in the time slot design to allow for read retry operations. To make M cycles of read retry operations possible, the time slot interval should be at least a sum of the time (a+b) shown in FIG. 12 and the time required for M turns of disk spins (e.g., 8.3 ms.times.M in the aforementioned example). However, in comparison with the design allowing no read retries, this method degrades the server's maximum throughput. More specifically, the maximum number of concurrent streams in the present example is calculated as follows. When M=1, EQU 384/(140+35+8.3.times.1).times.5.congruent.10.5 [MB/s] 10.5.times.8/6.144=13.6.fwdarw.13 [stream] (5)
When M=2, EQU 384/(140+35+8.3.times.2).times.5.congruent.10.0 [MB/s] 10.0.times.8/6.144=13.0.fwdarw.13 [stream] (6)
When M=3, EQU 384/(140+35+8.3.times.3).times.5.congruent.9.6 [MB/s] 9.6.times.8/6.144=12.5.fwdarw.12 [stream] (7)
As such, the video server is no longer capable of sending fourteen concurrent video streams at a bitrate of 6.144 Mb/s.
In actual video-on-demand systems, however, video servers are rarely required to show their maximum throughputs on a constant basis. When few clients are requesting services, the number of video streams produced by the video server will be naturally reduced. Regardless of this, however, conventional video servers still have to maintain the principle of "a single block read within a single time slot" in their disk access, because of their basic design concept. Therefore, the conventional servers do not retry the disk access to recover from read errors even in such a situation where only a few streams are in service and thus the drives have much time to spare.
The problems discussed above are not peculiar to data read operations, but also applicable to data write operations that stripe data across a plurality of disk drives to meet the requirements of realtime applications. Being designed to finish the data bus transfer and disk write operations in a fixed time slot, the conventional servers are unable to rewrite data to recover from write errors, even when the number of streams in session has not reached the maximum capacity.